package com.wicket.okrcalc.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrcalc.biz.service.AchievementService;
import com.wicket.okrcalc.biz.service.dto.req.*;
import com.wicket.okrcalc.biz.service.dto.res.*;
import com.wicket.okrcalc.common.ro.OkrResult;
import com.wicket.okrcalc.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/calc/achievement/")
public class AchievementController {

  @Autowired
  AchievementService achievementService;

/**
   * D4统计规划成果数(公共)
   */
    @PostMapping("statisticsTargetPlanAchievementNumCom")
    public OkrResult<StatisticsTargetPlanAchievementNumComRespDto> statisticsTargetPlanAchievementNumCom(@RequestBody @Validated StatisticsTargetPlanAchievementNumComReqDto reqDTO){
    return OkrResult.success(achievementService.statisticsTargetPlanAchievementNumCom(reqDTO));
    }
/**
   * D4统计目标内容及所属主体成果数(公共)
   */
    @PostMapping("statisticsTargetContAndOwnerAchievementsCom")
    public OkrResult<StatisticsTargetContAndOwnerAchievementsComRespDto> statisticsTargetContAndOwnerAchievementsCom(@RequestBody @Validated StatisticsTargetContAndOwnerAchievementsComReqDto reqDTO){
    return OkrResult.success(achievementService.statisticsTargetContAndOwnerAchievementsCom(reqDTO));
    }
/**
   * D4统计绩效目标内容及所属主体成果数(公共)
   */
    @PostMapping("statisticsPerfTargetContAndOwnerAchievementsCom")
    public OkrResult<StatisticsPerfTargetContAndOwnerAchievementsComRespDto> statisticsPerfTargetContAndOwnerAchievementsCom(@RequestBody @Validated StatisticsPerfTargetContAndOwnerAchievementsComReqDto reqDTO){
    return OkrResult.success(achievementService.statisticsPerfTargetContAndOwnerAchievementsCom(reqDTO));
    }
}
